import request from "@/request/";

// 获取列表
export const getList = (data) => {
  return request({
    url: "/api/mes-warehouse-service/purc-order/page",
    method: "POST",
    data,
  });
};

// 查看详情
export const getDetail = (id) => {
  return request({
    url: "/api/mes-warehouse-service/purc-order/detail",
    method: "POST",
    data: {
      id,
    },
  });
};

// 查看详情-表格
export const getDetailTable = (data) => {
  return request({
    url: "/api/mes-warehouse-service/purc-order/detail/page",
    method: "POST",
    data,
  });
};

// 导出
export const exportData = (data) => {
  return request({
    url: `/api/mes-warehouse-service/purc-order/export`,
    method: "POST",
    responseType: "blob",
    timeout: 300000,
    data: data,
  });
};

export const getEnum = (keyList) => {
  return request({
    url: "/api/mes-warehouse-service/preset/enum/list",
    method: "POST",
    data: {
      keyList,
    },
  });
};
